
package ch.hearc.coursJava.kitBase.tableau.equationOrdre1;

import com.bilat.tools.io.console.Clavier;

public class EquationOrdre1
	{

	/*------------------------------------------------------------------*\
	|*							Methodes Public							*|
	\*------------------------------------------------------------------*/

	/**
	 * <pre>
	 * tab[0] = a
	 * tab[1] = b
	 *</pre>
	 */
	public static double[] saisirCoefficient()
		{
		double[] tab = new double[2];

		do
			{
			tab[0] = Clavier.lireDouble("a = ");
			} while(tab[0] == 0);

		tab[1] = Clavier.lireDouble("b = ");

		return tab;
		}

	public static double solve(double[] tabCoefficients)
		{
		return -tabCoefficients[1] / tabCoefficients[0];
		}

	public static double solve(double a, double b)
		{
		double[] tab=new double[]{a,b };
		return solve(tab);
		}

	/*------------------------------------------------------------------*\
	|*							Methodes Private						*|
	\*------------------------------------------------------------------*/

	}
